<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>九江职业大学信息工程学院</title>
<link href="../../css/css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="wrap">
<div id="haader">
    <%@include file="header.jsp"%>

</div>
<div id="sec_contenter">
    <div id="main">
        <div class="section1">
        </div>
        <div class="section2">
        <div class="m1">
        <h1>${title}</h1>
        <ul>
            <c:forEach items="${allNews}" var="info">
                <li><a href="${pageContext.request.contextPath}/showNews?info_id=${info.info_id}" target="_blank">${info.title}</a><span>2017-05-16</span></li>
            </c:forEach>
        </ul>
        <a href="#"><img src="images/more.gif" width="48" height="26" /></a>
        </div>
        </div>
<%--        分页--%>
        <div class="pagelist" style="text-align: center;color: black;margin: 0 10px;">
            <a href="${pageContext.request.contextPath}/showNews?pageNum=${pageIndex}&&info_id=${info.info_id}&&info.title=${info.info_title}" onclick="ColorBar('${pageIndex}')" id="n">首页</a>
            <a href="${pageContext.request.contextPath}/showNews?pageNum=${pageNum-1}&&info_id=${info.info_id}&&info.title=${info.info_title}" onclick="ColorBar('${pageNum}')" id="n">上一页</a>
            <c:forEach begin="1" var="i" end="${pageCount}" step="1">
                <a href="${pageContext.request.contextPath}/showNews?pageNum=${i}&&info_id=${info.info_id}&&info.title=${info.info_title}" id="number">${i }</a>
            </c:forEach>
            <a href="${pageContext.request.contextPath}/showNews?pageNum=${pageNum+1}&&info_id=${info.info_id}&&info.title=${info.info_title}" onclick="ColorBar('${pageNum}')" id="n">下一页</a>
            <a href="${pageContext.request.contextPath}/showNews?pageNum=${pageCount}&&info_id=${info.info_id}&&info.title=${info.info_title}" onclick="ColorBar('${pageNum}')" id="n">尾页</a>
        </div>
    </div>
    <div class="center"></div>
    <div id="side">
      <div class="s1">
          <h1>学院公告</h1>
          <ul>
              <c:forEach items="${info3List}" var="info">
                  <li><a href="${pageContext.request.contextPath}/showNews?info_id=${info.info_id}" target="_blank">${info.title}</a><span>2017-05-16</span></li>
              </c:forEach>
          </ul>
      </div>
      <div class="s3">
          <img src="images/gkk.jpg" width="200" height="90" />
      </div>
      <div class="s1 s2">
          <h1>专业设置</h1>
          <ul>
              <c:forEach items="${info4List}" var="info">
                  <li><a href="${pageContext.request.contextPath}/showNews?info_id=${info.info_id}" target="_blank">${info.title}</a><span>2017-05-16</span></li>
              </c:forEach>
          </ul>
      </div>
  </div>
  <div class="clear"></div>
</div>
<div id="pagefooter">
    <%@include file="pagefooter.jsp"%>
</div>
</div>
<script type="application/javascript">
    function ColorBar(num){
        $('#n').click(function(){
            $('.number').css('backgroundColor','blue');
        })

    }
</script>
</body>
</html>
